package com.android.mms.sec;

import androidx.appcompat.app.AppCompatActivity;

import android.Manifest;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import org.w3c.dom.Text;

public class MainActivity extends Activity {

    private TextView mTvTabMms;
    private TextView mTvTabContact;

    private View mTabLayoutMms;
    private View mTabLayoutContact;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sec_main_container_layout);

        mTabLayoutMms = findViewById(R.id.sec_container_layout_mms);
        mTabLayoutContact = findViewById(R.id.sec_container_layout_contact);
        mTvTabMms = findViewById(R.id.tv_tab_mms);
        mTvTabContact = findViewById(R.id.tv_tab_contact);

        findViewById(R.id.tab_btn_mms).setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                mTabLayoutMms.setVisibility(View.VISIBLE);
                mTabLayoutContact.setVisibility(View.GONE);
                mTvTabMms.setTextAppearance(R.style.TabTextSelect);
                mTvTabContact.setTextAppearance(R.style.TabTextNormal);
                mTvTabMms.setBackgroundResource(R.drawable.sec_text_underline_bg);
                mTvTabContact.setBackgroundColor(Color.TRANSPARENT);
            }
        });
        findViewById(R.id.tab_btn_contact).setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                mTabLayoutMms.setVisibility(View.GONE);
                mTabLayoutContact.setVisibility(View.VISIBLE);
                mTvTabMms.setTextAppearance(R.style.TabTextNormal);
                mTvTabContact.setTextAppearance(R.style.TabTextSelect);
                mTvTabMms.setBackgroundColor(Color.TRANSPARENT);
                mTvTabContact.setBackgroundResource(R.drawable.sec_text_underline_bg);
            }
        });
        findViewById(R.id.sec_btn_new_message).setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {

            }
        });

        requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, 0);
    }
}